<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.5"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>SWM34S_LVGL7.11_SWMUI: C:/Users/DELL/Desktop/Commit/lvgl/SWM34S_LVGL7.11_SWMUI_20230515/APP/Common Module/load_file.h 文件参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">SWM34S_LVGL7.11_SWMUI<span id="projectnumber">&#160;V7.9</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.9.5 -->
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_0ca16891106f5a3e9ad635a0d6c5f98f.html">APP</a></li><li class="navelem"><a class="el" href="dir_df4e0e4e72f77ab290fd1a24f190250a.html">Common Module</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#enum-members">枚举</a> &#124;
<a href="#func-members">函数</a> &#124;
<a href="#var-members">变量</a>  </div>
  <div class="headertitle"><div class="title">load_file.h 文件参考</div></div>
</div><!--header-->
<div class="contents">

<p>加载/拷贝文件  
<a href="#details">更多...</a></p>
<div class="textblock"><code>#include &quot;SWM341.h&quot;</code><br />
<code>#include &quot;ff.h&quot;</code><br />
</div><div class="textblock"><div class="dynheader">
load_file.h 的引用(Include)关系图:</div>
<div class="dyncontent">
<div class="center"><img src="load__file_8h__incl.png" border="0" usemap="#a_c_1_2_users_2_d_e_l_l_2_desktop_2_commit_2lvgl_2_s_w_m34_s___l_v_g_l7_811___s_w_m_u_i__20230515_2_a_p_p_2_common_01_module_2load__file_8h" alt=""/></div>
<map name="a_c_1_2_users_2_d_e_l_l_2_desktop_2_commit_2lvgl_2_s_w_m34_s___l_v_g_l7_811___s_w_m_u_i__20230515_2_a_p_p_2_common_01_module_2load__file_8h" id="a_c_1_2_users_2_d_e_l_l_2_desktop_2_commit_2lvgl_2_s_w_m34_s___l_v_g_l7_811___s_w_m_u_i__20230515_2_a_p_p_2_common_01_module_2load__file_8h">
<area shape="rect" title="加载/拷贝文件" alt="" coords="5,5,229,75"/>
<area shape="rect" title=" " alt="" coords="31,123,118,148"/>
<area shape="rect" title=" " alt="" coords="142,123,181,148"/>
</map>
</div>
</div><div class="textblock"><div class="dynheader">
此图展示该文件直接或间接的被哪些文件引用了:</div>
<div class="dyncontent">
<div class="center"><img src="load__file_8h__dep__incl.png" border="0" usemap="#a_c_1_2_users_2_d_e_l_l_2_desktop_2_commit_2lvgl_2_s_w_m34_s___l_v_g_l7_811___s_w_m_u_i__20230515_2_a_p_p_2_common_01_module_2load__file_8hdep" alt=""/></div>
<map name="a_c_1_2_users_2_d_e_l_l_2_desktop_2_commit_2lvgl_2_s_w_m34_s___l_v_g_l7_811___s_w_m_u_i__20230515_2_a_p_p_2_common_01_module_2load__file_8hdep" id="a_c_1_2_users_2_d_e_l_l_2_desktop_2_commit_2lvgl_2_s_w_m34_s___l_v_g_l7_811___s_w_m_u_i__20230515_2_a_p_p_2_common_01_module_2load__file_8hdep">
<area shape="rect" title="加载/拷贝文件" alt="" coords="1112,5,1336,75"/>
<area shape="rect" href="file__table_8h.html" title="以文件表管理 SPI&#45;Flash 存储的文件" alt="" coords="883,123,1107,192"/>
<area shape="rect" href="ui_8h.html" title="UI 页面布局" alt="" coords="880,365,1099,419"/>
<area shape="rect" href="ui__boot_8c.html" title="开机动画/视频页, 挂载文件系统完成主页素材的导入" alt="" coords="1123,365,1365,419"/>
<area shape="rect" href="ui__update_8c.html" title="启动引导更新页, 挂载文件系统实现 UI 素材导入/更新(可选模块)" alt="" coords="1236,240,1455,309"/>
<area shape="rect" href="load__file_8c.html" title="加载/拷贝文件" alt="" coords="1535,123,1759,192"/>
<area shape="rect" href="userboot_8h.html" title="IAP 实现 UserBoot 功能" alt="" coords="1287,123,1511,192"/>
<area shape="rect" href="file__table_8c.html" title="以文件表管理 SPI&#45;Flash 存储的文件" alt="" coords="620,240,844,309"/>
<area shape="rect" href="image__source_8h.html" title="管理加载至 SDRAM 的图片资源(即 lv_img_dsc_t 结构体)" alt="" coords="868,240,1111,309"/>
<area shape="rect" href="image__source_8c.html" title="管理加载至 SDRAM 的图片资源(即 lv_img_dsc_t 结构体)" alt="" coords="613,357,856,427"/>
<area shape="rect" href="setup__home__page__home_8c.html" title="Home 页" alt="" coords="5,592,224,661"/>
<area shape="rect" href="setup__home__page__m0_8c.html" title="M0 芯片选型页" alt="" coords="248,592,467,661"/>
<area shape="rect" href="setup__home__page__m4_8c.html" title="M4 芯片选型页" alt="" coords="491,592,709,661"/>
<area shape="rect" href="setup__home__page__pd_8c.html" title="产品介绍、应用宣传页" alt="" coords="733,592,952,661"/>
<area shape="rect" href="setup__home__page__pp_8c.html" title="GIF 演示、中文字体应用页" alt="" coords="1219,592,1437,661"/>
<area shape="rect" href="setup__scr__home_8c.html" title="创建主桌面" alt="" coords="1461,592,1680,661"/>
<area shape="rect" href="setup__scr__m0__m4_8c.html" title="创建 M0 / M4 芯片具体型号介绍展示页" alt="" coords="1704,592,1923,661"/>
<area shape="rect" href="ui__event_8h.html" title="UI 页面事件回调" alt="" coords="880,475,1099,544"/>
<area shape="rect" href="ui_8c.html" title="UI 页面布局" alt="" coords="1275,482,1493,537"/>
<area shape="rect" href="ui__event_8c.html" title="UI 页面事件回调" alt="" coords="976,592,1195,661"/>
<area shape="rect" href="userboot_8c.html" title="IAP 实现 UserBoot 功能" alt="" coords="1479,240,1703,309"/>
</map>
</div>
</div>
<p><a href="load__file_8h_source.html">浏览源代码.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="enum-members" name="enum-members"></a>
枚举</h2></td></tr>
<tr class="memitem:a44edb5dd69763758dda6af4dd162c997"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="load__file_8h.html#a44edb5dd69763758dda6af4dd162c997">disk_t</a> { <a class="el" href="load__file_8h.html#a44edb5dd69763758dda6af4dd162c997aefea9eb0772378037221a3f1fe759a76">SPI</a> = 0
, <a class="el" href="load__file_8h.html#a44edb5dd69763758dda6af4dd162c997a8268cafd51299d814aba050e5f54f1ac">SD</a>
, <a class="el" href="load__file_8h.html#a44edb5dd69763758dda6af4dd162c997a65f6b55fdc64778bf10632a795b97761">USB</a>
 }</td></tr>
<tr class="memdesc:a44edb5dd69763758dda6af4dd162c997"><td class="mdescLeft">&#160;</td><td class="mdescRight">磁盘类型  <a href="load__file_8h.html#a44edb5dd69763758dda6af4dd162c997">更多...</a><br /></td></tr>
<tr class="separator:a44edb5dd69763758dda6af4dd162c997"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a044f73b36811553cd877767a7df11f83"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="load__file_8h.html#a044f73b36811553cd877767a7df11f83">resource_t</a> { <a class="el" href="load__file_8h.html#a044f73b36811553cd877767a7df11f83a1e00c983d4be44226a3b1ba10382e3e9">IMG</a> = 0
, <a class="el" href="load__file_8h.html#a044f73b36811553cd877767a7df11f83a3dba92f17ebb0d7efe6056d51e9acdc7">BIN</a>
, <a class="el" href="load__file_8h.html#a044f73b36811553cd877767a7df11f83ab22456aa73d7862a07ffbc9117324f3e">WAV</a>
, <a class="el" href="load__file_8h.html#a044f73b36811553cd877767a7df11f83a2db6506cbb3a11215ddceb3db9c4502b">AVI</a>
 }</td></tr>
<tr class="memdesc:a044f73b36811553cd877767a7df11f83"><td class="mdescLeft">&#160;</td><td class="mdescRight">资源类型  <a href="load__file_8h.html#a044f73b36811553cd877767a7df11f83">更多...</a><br /></td></tr>
<tr class="separator:a044f73b36811553cd877767a7df11f83"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
函数</h2></td></tr>
<tr class="memitem:aebe4a0d647831986c734e1788150a064"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="load__file_8h.html#aebe4a0d647831986c734e1788150a064">fs_mount</a> (<a class="el" href="load__file_8h.html#a44edb5dd69763758dda6af4dd162c997">disk_t</a> disk)</td></tr>
<tr class="memdesc:aebe4a0d647831986c734e1788150a064"><td class="mdescLeft">&#160;</td><td class="mdescRight">为磁盘挂载文件系统  <a href="load__file_8h.html#aebe4a0d647831986c734e1788150a064">更多...</a><br /></td></tr>
<tr class="separator:aebe4a0d647831986c734e1788150a064"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2826c976bae07983300096521da284b4"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="load__file_8h.html#a2826c976bae07983300096521da284b4">fs_unmount</a> (<a class="el" href="load__file_8h.html#a44edb5dd69763758dda6af4dd162c997">disk_t</a> disk)</td></tr>
<tr class="memdesc:a2826c976bae07983300096521da284b4"><td class="mdescLeft">&#160;</td><td class="mdescRight">为磁盘卸载文件系统  <a href="load__file_8h.html#a2826c976bae07983300096521da284b4">更多...</a><br /></td></tr>
<tr class="separator:a2826c976bae07983300096521da284b4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a51d572edecc93d80a160b93843fb5208"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="load__file_8h.html#a51d572edecc93d80a160b93843fb5208">fs_mkfs</a> (<a class="el" href="load__file_8h.html#a44edb5dd69763758dda6af4dd162c997">disk_t</a> disk)</td></tr>
<tr class="memdesc:a51d572edecc93d80a160b93843fb5208"><td class="mdescLeft">&#160;</td><td class="mdescRight">磁盘新建卷, 重置清空卷  <a href="load__file_8h.html#a51d572edecc93d80a160b93843fb5208">更多...</a><br /></td></tr>
<tr class="separator:a51d572edecc93d80a160b93843fb5208"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a054ac4b07b339f1cda65d041546a46f2"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="load__file_8h.html#a054ac4b07b339f1cda65d041546a46f2">copy_file</a> (const char *src_path, const char *dst_path)</td></tr>
<tr class="memdesc:a054ac4b07b339f1cda65d041546a46f2"><td class="mdescLeft">&#160;</td><td class="mdescRight">拷贝文件  <a href="load__file_8h.html#a054ac4b07b339f1cda65d041546a46f2">更多...</a><br /></td></tr>
<tr class="separator:a054ac4b07b339f1cda65d041546a46f2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2efc2116dbabe389a95c812f9dc6aa03"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="load__file_8h.html#a2efc2116dbabe389a95c812f9dc6aa03">load_source_to_sdram</a> (<a class="el" href="load__file_8h.html#a44edb5dd69763758dda6af4dd162c997">disk_t</a> disk, const char *path, <a class="el" href="load__file_8h.html#a044f73b36811553cd877767a7df11f83">resource_t</a> type, void *res_struct, void *(*ram_malloc)(size_t))</td></tr>
<tr class="memdesc:a2efc2116dbabe389a95c812f9dc6aa03"><td class="mdescLeft">&#160;</td><td class="mdescRight">加载资源至 SDRAM 内  <a href="load__file_8h.html#a2efc2116dbabe389a95c812f9dc6aa03">更多...</a><br /></td></tr>
<tr class="separator:a2efc2116dbabe389a95c812f9dc6aa03"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a62a6b593e3ff4f0f2c1b13773df449b0"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="load__file_8h.html#a62a6b593e3ff4f0f2c1b13773df449b0">remove_source_to_sdram</a> (<a class="el" href="load__file_8h.html#a044f73b36811553cd877767a7df11f83">resource_t</a> type, void *source, uint8_t(*ram_free)(void *))</td></tr>
<tr class="memdesc:a62a6b593e3ff4f0f2c1b13773df449b0"><td class="mdescLeft">&#160;</td><td class="mdescRight">销毁位于 SDRAM 内的资源  <a href="load__file_8h.html#a62a6b593e3ff4f0f2c1b13773df449b0">更多...</a><br /></td></tr>
<tr class="separator:a62a6b593e3ff4f0f2c1b13773df449b0"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="var-members" name="var-members"></a>
变量</h2></td></tr>
<tr class="memitem:a08687ba7285d01a737a269b697bb661c"><td class="memItemLeft" align="right" valign="top">const char *const&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="load__file_8h.html#a08687ba7285d01a737a269b697bb661c">VolumeStr</a> [FF_VOLUMES]</td></tr>
<tr class="memdesc:a08687ba7285d01a737a269b697bb661c"><td class="mdescLeft">&#160;</td><td class="mdescRight">User defied volume ID  <a href="load__file_8h.html#a08687ba7285d01a737a269b697bb661c">更多...</a><br /></td></tr>
<tr class="separator:a08687ba7285d01a737a269b697bb661c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><p >加载/拷贝文件 </p>
<p >外置移动存储(SD卡 / U盘) &lt;-&gt; 板载 SPI-Flash -&gt; 芯片内置 SDRAM. </p><dl class="section since"><dt>自从</dt><dd>Change Logs: Date Author Notes 2022-12-08 lzh the first version </dd></dl>
<dl class="section remark"><dt>备注</dt><dd>采用 FATFS 文件系统管理 片外存储, 故本模块的实现高度依赖于 FATFS 开源组件, 移植本模块请附带先移植 FATFS 组件.</dd></dl>
<p>板载 SPI-Flash -&gt; 芯片内置 SDRAM 的导入过程, 对于片内 SDRAM 存储空间的管理, 统一使用如下接口实现 :</p>
<p >void *(*ram_malloc)(size_t) : (分配成功的内存块首地址) &lt;*内存分配回调&gt; (预分配大小)</p>
<p >uint8_t (*ram_free)(void *) : (释放结果) &lt;*内存释放回调&gt; (分配成功的内存块首地址)</p>
<p >而 mem_sdram 模块已实现上述接口, 用户在使用本模块(板载 SPI-Flash -&gt; 芯片内置 SDRAM )功能时, 可以配合 mem_sdram 模块一起调用, 也可以自行实现如上两个接口.</p>
<p >通过上述接口, 与 mem_sdram 模块隔离开.</p>
<dl class="section attention"><dt>注意</dt><dd></dd></dl>
<p>THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. AS A RESULT, SYNWIT SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION CONTAINED HEREIN IN CONN- -ECTION WITH THEIR PRODUCTS.</p>
<dl class="section copyright"><dt>版权所有</dt><dd>2012 Synwit Technology </dd></dl>

<p class="definition">在文件 <a class="el" href="load__file_8h_source.html">load_file.h</a> 中定义.</p>
</div><h2 class="groupheader">枚举类型说明</h2>
<a id="a44edb5dd69763758dda6af4dd162c997" name="a44edb5dd69763758dda6af4dd162c997"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a44edb5dd69763758dda6af4dd162c997">&#9670;&#160;</a></span>disk_t</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="load__file_8h.html#a44edb5dd69763758dda6af4dd162c997">disk_t</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>磁盘类型 </p>
<table class="fieldtable">
<tr><th colspan="2">枚举值</th></tr><tr><td class="fieldname"><a id="a44edb5dd69763758dda6af4dd162c997aefea9eb0772378037221a3f1fe759a76" name="a44edb5dd69763758dda6af4dd162c997aefea9eb0772378037221a3f1fe759a76"></a>SPI&#160;</td><td class="fielddoc"><p >SPI-Flash </p>
</td></tr>
<tr><td class="fieldname"><a id="a44edb5dd69763758dda6af4dd162c997a8268cafd51299d814aba050e5f54f1ac" name="a44edb5dd69763758dda6af4dd162c997a8268cafd51299d814aba050e5f54f1ac"></a>SD&#160;</td><td class="fielddoc"><p >SD-TF卡(2 ~ 32 GB) </p>
</td></tr>
<tr><td class="fieldname"><a id="a44edb5dd69763758dda6af4dd162c997a65f6b55fdc64778bf10632a795b97761" name="a44edb5dd69763758dda6af4dd162c997a65f6b55fdc64778bf10632a795b97761"></a>USB&#160;</td><td class="fielddoc"><p >U盘( Full / Low - Speed ) </p>
</td></tr>
</table>

<p class="definition">在文件 <a class="el" href="load__file_8h_source.html">load_file.h</a> 第 <a class="el" href="load__file_8h_source.html#l00040">40</a> 行定义.</p>

</div>
</div>
<a id="a044f73b36811553cd877767a7df11f83" name="a044f73b36811553cd877767a7df11f83"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a044f73b36811553cd877767a7df11f83">&#9670;&#160;</a></span>resource_t</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="load__file_8h.html#a044f73b36811553cd877767a7df11f83">resource_t</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>资源类型 </p>
<table class="fieldtable">
<tr><th colspan="2">枚举值</th></tr><tr><td class="fieldname"><a id="a044f73b36811553cd877767a7df11f83a1e00c983d4be44226a3b1ba10382e3e9" name="a044f73b36811553cd877767a7df11f83a1e00c983d4be44226a3b1ba10382e3e9"></a>IMG&#160;</td><td class="fielddoc"><p >jpg 图 / 通过 PC 端工具转换图片生成的 bin </p>
</td></tr>
<tr><td class="fieldname"><a id="a044f73b36811553cd877767a7df11f83a3dba92f17ebb0d7efe6056d51e9acdc7" name="a044f73b36811553cd877767a7df11f83a3dba92f17ebb0d7efe6056d51e9acdc7"></a>BIN&#160;</td><td class="fielddoc"><p >其他 bin 文件(目前仅实现字库) </p>
</td></tr>
<tr><td class="fieldname"><a id="a044f73b36811553cd877767a7df11f83ab22456aa73d7862a07ffbc9117324f3e" name="a044f73b36811553cd877767a7df11f83ab22456aa73d7862a07ffbc9117324f3e"></a>WAV&#160;</td><td class="fielddoc"><p >wav 格式音频 </p>
</td></tr>
<tr><td class="fieldname"><a id="a044f73b36811553cd877767a7df11f83a2db6506cbb3a11215ddceb3db9c4502b" name="a044f73b36811553cd877767a7df11f83a2db6506cbb3a11215ddceb3db9c4502b"></a>AVI&#160;</td><td class="fielddoc"><p >avi 格式视频 </p>
</td></tr>
</table>

<p class="definition">在文件 <a class="el" href="load__file_8h_source.html">load_file.h</a> 第 <a class="el" href="load__file_8h_source.html#l00048">48</a> 行定义.</p>

</div>
</div>
<h2 class="groupheader">函数说明</h2>
<a id="aebe4a0d647831986c734e1788150a064" name="aebe4a0d647831986c734e1788150a064"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aebe4a0d647831986c734e1788150a064">&#9670;&#160;</a></span>fs_mount()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint8_t fs_mount </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="load__file_8h.html#a44edb5dd69763758dda6af4dd162c997">disk_t</a>&#160;</td>
          <td class="paramname"><em>disk</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>为磁盘挂载文件系统 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">disk</td><td>: 磁盘类型 </td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>返回值</dt><dd>
  <table class="retval">
    <tr><td class="paramname">0</td><td>: success </td></tr>
    <tr><td class="paramname">other</td><td>: error code </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">在文件 <a class="el" href="load__file_8c_source.html">load_file.c</a> 第 <a class="el" href="load__file_8c_source.html#l00128">128</a> 行定义.</p>
<div class="dynheader">
函数调用图:</div>
<div class="dyncontent">
<div class="center"><img src="load__file_8h_aebe4a0d647831986c734e1788150a064_cgraph.png" border="0" usemap="#aload__file_8h_aebe4a0d647831986c734e1788150a064_cgraph" alt=""/></div>
<map name="aload__file_8h_aebe4a0d647831986c734e1788150a064_cgraph" id="aload__file_8h_aebe4a0d647831986c734e1788150a064_cgraph">
<area shape="rect" title="为磁盘挂载文件系统" alt="" coords="5,31,80,56"/>
<area shape="rect" href="load__file_8c.html#a51d572edecc93d80a160b93843fb5208" title="磁盘新建卷, 重置清空卷" alt="" coords="139,5,206,31"/>
<area shape="rect" href="load__file_8c.html#a2826c976bae07983300096521da284b4" title="为磁盘卸载文件系统" alt="" coords="128,55,217,80"/>
</map>
</div>
<div class="dynheader">
这是这个函数的调用关系图:</div>
<div class="dyncontent">
<div class="center"><img src="load__file_8h_aebe4a0d647831986c734e1788150a064_icgraph.png" border="0" usemap="#aload__file_8h_aebe4a0d647831986c734e1788150a064_icgraph" alt=""/></div>
<map name="aload__file_8h_aebe4a0d647831986c734e1788150a064_icgraph" id="aload__file_8h_aebe4a0d647831986c734e1788150a064_icgraph">
<area shape="rect" title="为磁盘挂载文件系统" alt="" coords="819,88,893,114"/>
<area shape="rect" href="ui__update_8c.html#a4b62aef18e10709cce125faee1b7dd52" title="文件管理器" alt="" coords="353,39,444,64"/>
<area shape="rect" href="ui__update_8c.html#a64ccaf85822f651235e20a08dfc2c500" title="SD / USB Host 检测插入介质" alt="" coords="669,39,771,64"/>
<area shape="rect" href="ui__boot_8c.html#ad02910df5a0eb655a0a0495b475f7c0e" title="开机按计划自检, 完成一些文件系统挂载、素材文件的校验/更新等动作" alt="" coords="676,88,764,114"/>
<area shape="rect" href="ui__boot_8c.html#ad915e3f7b5aab86e375414a5844c500a" title="挂载文件系统以完成本地素材检测, 并将其导入至 SDRAM , 同时实现开机动画/视频效果" alt="" coords="525,99,589,124"/>
<area shape="rect" href="userboot_8c.html#a5d51bf8d3184d1c34b5fde41d69b1559" title="UserBoot 功能" alt="" coords="363,186,435,211"/>
<area shape="rect" href="ui__update_8c.html#aea66c53fcc188fefaa3470555db6aa05" title="启动 UI 引导加载界面, 挂载文件系统以实现 UI 素材导入/更新" alt="" coords="227,42,305,67"/>
<area shape="rect" href="main_8c.html#a8f1efe6291a27ae9b326f0c8a236c102" title="Go to User App Execute" alt="" coords="104,99,179,124"/>
<area shape="rect" href="main_8c.html#a840291bc02cba5474a4cb46a9b9566fe" title="C_Main" alt="" coords="5,136,56,162"/>
<area shape="rect" href="ui__update_8c.html#ac4bb8b84a1ae2abc7bd0419c4345bca2" title="选择不同加载方式后, 由此函数执行分支跳转" alt="" coords="492,39,621,64"/>
</map>
</div>

</div>
</div>
<a id="a2826c976bae07983300096521da284b4" name="a2826c976bae07983300096521da284b4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2826c976bae07983300096521da284b4">&#9670;&#160;</a></span>fs_unmount()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint8_t fs_unmount </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="load__file_8h.html#a44edb5dd69763758dda6af4dd162c997">disk_t</a>&#160;</td>
          <td class="paramname"><em>disk</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>为磁盘卸载文件系统 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">disk</td><td>: 磁盘类型 </td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>返回值</dt><dd>
  <table class="retval">
    <tr><td class="paramname">0</td><td>: success </td></tr>
    <tr><td class="paramname">other</td><td>: error code </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">在文件 <a class="el" href="load__file_8c_source.html">load_file.c</a> 第 <a class="el" href="load__file_8c_source.html#l00150">150</a> 行定义.</p>
<div class="dynheader">
这是这个函数的调用关系图:</div>
<div class="dyncontent">
<div class="center"><img src="load__file_8h_a2826c976bae07983300096521da284b4_icgraph.png" border="0" usemap="#aload__file_8h_a2826c976bae07983300096521da284b4_icgraph" alt=""/></div>
<map name="aload__file_8h_a2826c976bae07983300096521da284b4_icgraph" id="aload__file_8h_a2826c976bae07983300096521da284b4_icgraph">
<area shape="rect" title="为磁盘卸载文件系统" alt="" coords="941,144,1031,169"/>
<area shape="rect" href="load__file_8c.html#aebe4a0d647831986c734e1788150a064" title="为磁盘挂载文件系统" alt="" coords="819,118,893,144"/>
<area shape="rect" href="userboot_8c.html#a5d51bf8d3184d1c34b5fde41d69b1559" title="UserBoot 功能" alt="" coords="684,194,756,220"/>
<area shape="rect" href="ui__update_8c.html#a4b62aef18e10709cce125faee1b7dd52" title="文件管理器" alt="" coords="353,44,444,69"/>
<area shape="rect" href="ui__update_8c.html#a64ccaf85822f651235e20a08dfc2c500" title="SD / USB Host 检测插入介质" alt="" coords="669,44,771,69"/>
<area shape="rect" href="ui__boot_8c.html#ad02910df5a0eb655a0a0495b475f7c0e" title="开机按计划自检, 完成一些文件系统挂载、素材文件的校验/更新等动作" alt="" coords="676,93,764,118"/>
<area shape="rect" href="ui__boot_8c.html#ad915e3f7b5aab86e375414a5844c500a" title="挂载文件系统以完成本地素材检测, 并将其导入至 SDRAM , 同时实现开机动画/视频效果" alt="" coords="525,113,589,138"/>
<area shape="rect" href="ui__update_8c.html#aea66c53fcc188fefaa3470555db6aa05" title="启动 UI 引导加载界面, 挂载文件系统以实现 UI 素材导入/更新" alt="" coords="227,50,305,76"/>
<area shape="rect" href="main_8c.html#a8f1efe6291a27ae9b326f0c8a236c102" title="Go to User App Execute" alt="" coords="104,113,179,138"/>
<area shape="rect" href="main_8c.html#a840291bc02cba5474a4cb46a9b9566fe" title="C_Main" alt="" coords="5,162,56,188"/>
<area shape="rect" href="ui__update_8c.html#ac4bb8b84a1ae2abc7bd0419c4345bca2" title="选择不同加载方式后, 由此函数执行分支跳转" alt="" coords="492,44,621,69"/>
</map>
</div>

</div>
</div>
<a id="a51d572edecc93d80a160b93843fb5208" name="a51d572edecc93d80a160b93843fb5208"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a51d572edecc93d80a160b93843fb5208">&#9670;&#160;</a></span>fs_mkfs()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint8_t fs_mkfs </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="load__file_8h.html#a44edb5dd69763758dda6af4dd162c997">disk_t</a>&#160;</td>
          <td class="paramname"><em>disk</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>磁盘新建卷, 重置清空卷 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">disk</td><td>: 磁盘类型 </td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>返回值</dt><dd>
  <table class="retval">
    <tr><td class="paramname">0</td><td>: success </td></tr>
    <tr><td class="paramname">other</td><td>: error code </td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>注解</dt><dd>删除单个文件使用 f_unlink(), 且必须先关闭文件, 否则 f_unlink 将被拒绝 </dd></dl>

<p class="definition">在文件 <a class="el" href="load__file_8c_source.html">load_file.c</a> 第 <a class="el" href="load__file_8c_source.html#l00162">162</a> 行定义.</p>
<div class="dynheader">
这是这个函数的调用关系图:</div>
<div class="dyncontent">
<div class="center"><img src="load__file_8h_a51d572edecc93d80a160b93843fb5208_icgraph.png" border="0" usemap="#aload__file_8h_a51d572edecc93d80a160b93843fb5208_icgraph" alt=""/></div>
<map name="aload__file_8h_a51d572edecc93d80a160b93843fb5208_icgraph" id="aload__file_8h_a51d572edecc93d80a160b93843fb5208_icgraph">
<area shape="rect" title="磁盘新建卷, 重置清空卷" alt="" coords="961,107,1028,132"/>
<area shape="rect" href="ui__update_8c.html#a3dbd73c82f05a5370635333b5ed68aea" title="点击不同的按钮后, 由此函数执行对应动作" alt="" coords="819,207,913,232"/>
<area shape="rect" href="load__file_8c.html#aebe4a0d647831986c734e1788150a064" title="为磁盘挂载文件系统" alt="" coords="829,107,903,132"/>
<area shape="rect" href="ui__boot_8c.html#ad02910df5a0eb655a0a0495b475f7c0e" title="开机按计划自检, 完成一些文件系统挂载、素材文件的校验/更新等动作" alt="" coords="676,5,764,31"/>
<area shape="rect" href="ui__update_8c.html#a4b62aef18e10709cce125faee1b7dd52" title="文件管理器" alt="" coords="353,183,444,208"/>
<area shape="rect" href="ui__update_8c.html#aea66c53fcc188fefaa3470555db6aa05" title="启动 UI 引导加载界面, 挂载文件系统以实现 UI 素材导入/更新" alt="" coords="227,169,305,195"/>
<area shape="rect" href="main_8c.html#a8f1efe6291a27ae9b326f0c8a236c102" title="Go to User App Execute" alt="" coords="104,107,179,132"/>
<area shape="rect" href="main_8c.html#a840291bc02cba5474a4cb46a9b9566fe" title="C_Main" alt="" coords="5,81,56,107"/>
<area shape="rect" href="ui__update_8c.html#a64ccaf85822f651235e20a08dfc2c500" title="SD / USB Host 检测插入介质" alt="" coords="669,157,771,183"/>
<area shape="rect" href="ui__boot_8c.html#ad915e3f7b5aab86e375414a5844c500a" title="挂载文件系统以完成本地素材检测, 并将其导入至 SDRAM , 同时实现开机动画/视频效果" alt="" coords="525,107,589,132"/>
<area shape="rect" href="userboot_8c.html#a5d51bf8d3184d1c34b5fde41d69b1559" title="UserBoot 功能" alt="" coords="363,56,435,81"/>
<area shape="rect" href="ui__update_8c.html#ac4bb8b84a1ae2abc7bd0419c4345bca2" title="选择不同加载方式后, 由此函数执行分支跳转" alt="" coords="492,157,621,183"/>
</map>
</div>

</div>
</div>
<a id="a054ac4b07b339f1cda65d041546a46f2" name="a054ac4b07b339f1cda65d041546a46f2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a054ac4b07b339f1cda65d041546a46f2">&#9670;&#160;</a></span>copy_file()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint8_t copy_file </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>src_path</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>dst_path</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>拷贝文件 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">src_path</td><td>: 源文件绝对路径 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">dst_path</td><td>: 目标文件绝对路径 </td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>返回值</dt><dd>
  <table class="retval">
    <tr><td class="paramname">0</td><td>: success </td></tr>
    <tr><td class="paramname">other</td><td>: error code </td></tr>
  </table>
  </dd>
</dl>
<dl class="section pre"><dt>前置条件</dt><dd>调用者有责任确保本函数调用时 源/目标文件所在 磁盘处于成功挂载文件系统的状态, 否则抛出错误. </dd></dl>
<dl class="section user"><dt>示例:</dt><dd><div class="fragment"><div class="line"><a class="code hl_function" href="load__file_8c.html#a054ac4b07b339f1cda65d041546a46f2">copy_file</a>(<span class="stringliteral">&quot;sd:test_0.bin&quot;</span>, <span class="stringliteral">&quot;spi:test_0.bin&quot;</span>)</div>
<div class="line"><a class="code hl_function" href="load__file_8c.html#a054ac4b07b339f1cda65d041546a46f2">copy_file</a>(&quot;sd:test_1.bin&quot;, &quot;spi:test_2.bin&quot;)</div>
<div class="ttc" id="aload__file_8c_html_a054ac4b07b339f1cda65d041546a46f2"><div class="ttname"><a href="load__file_8c.html#a054ac4b07b339f1cda65d041546a46f2">copy_file</a></div><div class="ttdeci">uint8_t copy_file(const char *src_path, const char *dst_path)</div><div class="ttdoc">拷贝文件</div><div class="ttdef"><b>Definition:</b> <a href="load__file_8c_source.html#l00180">load_file.c:180</a></div></div>
</div><!-- fragment --> </dd></dl>

<p class="definition">在文件 <a class="el" href="load__file_8c_source.html">load_file.c</a> 第 <a class="el" href="load__file_8c_source.html#l00180">180</a> 行定义.</p>
<div class="dynheader">
这是这个函数的调用关系图:</div>
<div class="dyncontent">
<div class="center"><img src="load__file_8h_a054ac4b07b339f1cda65d041546a46f2_icgraph.png" border="0" usemap="#aload__file_8h_a054ac4b07b339f1cda65d041546a46f2_icgraph" alt=""/></div>
<map name="aload__file_8h_a054ac4b07b339f1cda65d041546a46f2_icgraph" id="aload__file_8h_a054ac4b07b339f1cda65d041546a46f2_icgraph">
<area shape="rect" title="拷贝文件" alt="" coords="845,32,919,57"/>
<area shape="rect" href="file__table_8c.html#ae9814059aade68167dd27fac6439fa67" title="按文件名链表拷贝文件并显示拷贝过程 UI" alt="" coords="641,7,791,32"/>
<area shape="rect" href="file__table_8c.html#a9f89967794eeb4df91c77da5f983e163" title="按文件表拷贝文件并显示拷贝过程 UI" alt="" coords="635,56,797,81"/>
<area shape="rect" href="ui__update_8c.html#a3dbd73c82f05a5370635333b5ed68aea" title="点击不同的按钮后, 由此函数执行对应动作" alt="" coords="492,7,587,32"/>
<area shape="rect" href="ui__update_8c.html#a4b62aef18e10709cce125faee1b7dd52" title="文件管理器" alt="" coords="353,5,444,31"/>
<area shape="rect" href="ui__update_8c.html#aea66c53fcc188fefaa3470555db6aa05" title="启动 UI 引导加载界面, 挂载文件系统以实现 UI 素材导入/更新" alt="" coords="227,7,305,32"/>
<area shape="rect" href="main_8c.html#a8f1efe6291a27ae9b326f0c8a236c102" title="Go to User App Execute" alt="" coords="104,32,179,57"/>
<area shape="rect" href="main_8c.html#a840291bc02cba5474a4cb46a9b9566fe" title="C_Main" alt="" coords="5,32,56,57"/>
<area shape="rect" href="ui__boot_8c.html#ad02910df5a0eb655a0a0495b475f7c0e" title="开机按计划自检, 完成一些文件系统挂载、素材文件的校验/更新等动作" alt="" coords="495,56,583,81"/>
<area shape="rect" href="ui__boot_8c.html#ad915e3f7b5aab86e375414a5844c500a" title="挂载文件系统以完成本地素材检测, 并将其导入至 SDRAM , 同时实现开机动画/视频效果" alt="" coords="234,56,298,81"/>
</map>
</div>

</div>
</div>
<a id="a2efc2116dbabe389a95c812f9dc6aa03" name="a2efc2116dbabe389a95c812f9dc6aa03"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2efc2116dbabe389a95c812f9dc6aa03">&#9670;&#160;</a></span>load_source_to_sdram()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint8_t load_source_to_sdram </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="load__file_8h.html#a44edb5dd69763758dda6af4dd162c997">disk_t</a>&#160;</td>
          <td class="paramname"><em>disk</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>path</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="load__file_8h.html#a044f73b36811553cd877767a7df11f83">resource_t</a>&#160;</td>
          <td class="paramname"><em>type</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>res_struct</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *(*)(size_t)&#160;</td>
          <td class="paramname"><em>ram_malloc</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>加载资源至 SDRAM 内 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">disk</td><td>: 源文件所在磁盘 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">path</td><td>: 源文件相对路径 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">type</td><td>: 资源类型 </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">[in/out]</td><td>res_struct : 对应资源结构体(用于管理加载至 SDRAM 的资源, 可自定义解析) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">ram_malloc</td><td>: (分配成功的内存块首地址)&lt;*内存分配回调&gt;(预分配大小) </td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>返回值</dt><dd>
  <table class="retval">
    <tr><td class="paramname">0</td><td>: success </td></tr>
    <tr><td class="paramname">other</td><td>: error code </td></tr>
  </table>
  </dd>
</dl>
<dl class="section pre"><dt>前置条件</dt><dd>调用者有责任确保本函数调用时 源文件所在磁盘 处于成功挂载文件系统的状态. </dd></dl>
<dl class="section note"><dt>注解</dt><dd>本函数调用成功后, 对应资源结构体 res_struct 可用, 反之则不可用. </dd></dl>
<dl class="section user"><dt>示例:</dt><dd><div class="fragment"><div class="line"><a class="code hl_function" href="load__file_8c.html#a2efc2116dbabe389a95c812f9dc6aa03">load_source_to_sdram</a>(<a class="code hl_enumvalue" href="load__file_8h.html#a44edb5dd69763758dda6af4dd162c997aefea9eb0772378037221a3f1fe759a76">SPI</a>, <span class="stringliteral">&quot;test_0.bin&quot;</span>, <a class="code hl_enumvalue" href="load__file_8h.html#a044f73b36811553cd877767a7df11f83a1e00c983d4be44226a3b1ba10382e3e9">IMG</a>, &amp;lv_img_dsc, <a class="code hl_function" href="mem__sdram_8c.html#ae1630464a6d7686e9e41daf4b38e74a8">sdram_malloc</a>)</div>
<div class="line"><a class="code hl_function" href="load__file_8c.html#a2efc2116dbabe389a95c812f9dc6aa03">load_source_to_sdram</a>(<a class="code hl_enumvalue" href="load__file_8h.html#a44edb5dd69763758dda6af4dd162c997a8268cafd51299d814aba050e5f54f1ac">SD</a>, <span class="stringliteral">&quot;test_0.bin&quot;</span>, <a class="code hl_enumvalue" href="load__file_8h.html#a044f73b36811553cd877767a7df11f83a1e00c983d4be44226a3b1ba10382e3e9">IMG</a>, &amp;lv_img_dsc, <a class="code hl_function" href="mem__sdram_8c.html#ae1630464a6d7686e9e41daf4b38e74a8">sdram_malloc</a>)</div>
<div class="ttc" id="aload__file_8c_html_a2efc2116dbabe389a95c812f9dc6aa03"><div class="ttname"><a href="load__file_8c.html#a2efc2116dbabe389a95c812f9dc6aa03">load_source_to_sdram</a></div><div class="ttdeci">uint8_t load_source_to_sdram(disk_t disk, const char *path, resource_t type, void *res_struct, void *(*ram_malloc)(size_t))</div><div class="ttdoc">加载资源至 SDRAM 内</div><div class="ttdef"><b>Definition:</b> <a href="load__file_8c_source.html#l00289">load_file.c:289</a></div></div>
<div class="ttc" id="aload__file_8h_html_a044f73b36811553cd877767a7df11f83a1e00c983d4be44226a3b1ba10382e3e9"><div class="ttname"><a href="load__file_8h.html#a044f73b36811553cd877767a7df11f83a1e00c983d4be44226a3b1ba10382e3e9">IMG</a></div><div class="ttdeci">@ IMG</div><div class="ttdoc">jpg 图 / 通过 PC 端工具转换图片生成的 bin</div><div class="ttdef"><b>Definition:</b> <a href="load__file_8h_source.html#l00050">load_file.h:50</a></div></div>
<div class="ttc" id="aload__file_8h_html_a44edb5dd69763758dda6af4dd162c997a8268cafd51299d814aba050e5f54f1ac"><div class="ttname"><a href="load__file_8h.html#a44edb5dd69763758dda6af4dd162c997a8268cafd51299d814aba050e5f54f1ac">SD</a></div><div class="ttdeci">@ SD</div><div class="ttdoc">SD-TF卡(2 ~ 32 GB)</div><div class="ttdef"><b>Definition:</b> <a href="load__file_8h_source.html#l00043">load_file.h:43</a></div></div>
<div class="ttc" id="aload__file_8h_html_a44edb5dd69763758dda6af4dd162c997aefea9eb0772378037221a3f1fe759a76"><div class="ttname"><a href="load__file_8h.html#a44edb5dd69763758dda6af4dd162c997aefea9eb0772378037221a3f1fe759a76">SPI</a></div><div class="ttdeci">@ SPI</div><div class="ttdoc">SPI-Flash</div><div class="ttdef"><b>Definition:</b> <a href="load__file_8h_source.html#l00042">load_file.h:42</a></div></div>
<div class="ttc" id="amem__sdram_8c_html_ae1630464a6d7686e9e41daf4b38e74a8"><div class="ttname"><a href="mem__sdram_8c.html#ae1630464a6d7686e9e41daf4b38e74a8">sdram_malloc</a></div><div class="ttdeci">void * sdram_malloc(size_t size)</div><div class="ttdoc">申请一块内存</div><div class="ttdef"><b>Definition:</b> <a href="mem__sdram_8c_source.html#l00130">mem_sdram.c:130</a></div></div>
</div><!-- fragment --> </dd></dl>
<dl class="section remark"><dt>备注</dt><dd>设置多一个 disk 传参并将 path 设为相对路径的意义 : 可方便用户更换文件来源, 并利于对照 File_Table 查表 </dd></dl>

<p class="definition">在文件 <a class="el" href="load__file_8c_source.html">load_file.c</a> 第 <a class="el" href="load__file_8c_source.html#l00289">289</a> 行定义.</p>
<div class="dynheader">
函数调用图:</div>
<div class="dyncontent">
<div class="center"><img src="load__file_8h_a2efc2116dbabe389a95c812f9dc6aa03_cgraph.png" border="0" usemap="#aload__file_8h_a2efc2116dbabe389a95c812f9dc6aa03_cgraph" alt=""/></div>
<map name="aload__file_8h_a2efc2116dbabe389a95c812f9dc6aa03_cgraph" id="aload__file_8h_a2efc2116dbabe389a95c812f9dc6aa03_cgraph">
<area shape="rect" title="加载资源至 SDRAM 内" alt="" coords="5,31,159,56"/>
<area shape="rect" href="load__file_8c.html#af9dfd7a83175e3852794ad0cc1feffc3" title="加载二进制数据至 SDRAM 内" alt="" coords="216,5,347,31"/>
<area shape="rect" href="load__file_8c.html#a19787671d1d62339e0cf53a1b1f7ab98" title="加载图片信息至 SDRAM 内" alt="" coords="207,55,356,80"/>
<area shape="rect" href="dev__jpeg_8c.html#ac0e9fc8534c961b9dbba6ad4b8e8b61e" title="JPEG 硬件解码" alt="" coords="404,29,499,55"/>
<area shape="rect" href="dev__jpeg_8c.html#a1cbc17a98f22c1c19a7d33c85a14fccd" title="JPEG 硬件解码忙查询" alt="" coords="547,79,687,104"/>
<area shape="rect" href="jfif__parser_8c.html#abf9f65ef7651d67c735920acc808427a" title="JPEG 图片解析 JFIF 格式" alt="" coords="580,29,653,55"/>
</map>
</div>
<div class="dynheader">
这是这个函数的调用关系图:</div>
<div class="dyncontent">
<div class="center"><img src="load__file_8h_a2efc2116dbabe389a95c812f9dc6aa03_icgraph.png" border="0" usemap="#aload__file_8h_a2efc2116dbabe389a95c812f9dc6aa03_icgraph" alt=""/></div>
<map name="aload__file_8h_a2efc2116dbabe389a95c812f9dc6aa03_icgraph" id="aload__file_8h_a2efc2116dbabe389a95c812f9dc6aa03_icgraph">
<area shape="rect" title="加载资源至 SDRAM 内" alt="" coords="1505,220,1659,245"/>
<area shape="rect" href="ui__event_8c.html#a5d0714ab1f8d703a7a6aa480a25ba608" title="GIF 轮播刷新任务(用于 M0 芯片素材显示)" alt="" coords="1365,296,1457,321"/>
<area shape="rect" href="ui__event_8c.html#ac098d7daab78175856fe3d9f75df0347" title="进入 M0 / M4 SHOW 页前的资源准备" alt="" coords="1171,245,1309,271"/>
<area shape="rect" href="setup__scr__home_8c.html#a9e86b57f14343f1fdf1b6450fbcdef08" title="创建主桌面" alt="" coords="331,295,449,320"/>
<area shape="rect" href="ui__event_8c.html#a443210034526535b309f60ac9de63be6" title="GIF 轮播刷新任务(用于 M4 芯片素材显示)" alt="" coords="1365,195,1457,220"/>
<area shape="rect" href="ui__event_8c.html#a58f9ab749ec978cf6b8533ef55bf1045" title="产品应用演示 GIF 轮播刷新任务" alt="" coords="1367,345,1455,371"/>
<area shape="rect" href="ui__event_8c.html#a9a58add9c7451890f77c03ad8136b20d" title="中文字体 与 GIF 轮播演示 任务" alt="" coords="1367,93,1455,119"/>
<area shape="rect" href="ui__event_8c.html#a22a386f4f548c71737aba2415eba22fd" title="开始/暂停 按钮" alt="" coords="1181,80,1299,105"/>
<area shape="rect" href="ui__event_8c.html#aad0d0389b8cba40e9e02c141ce143196" title="上一张 / 下一张 按钮" alt="" coords="1163,5,1317,31"/>
<area shape="rect" href="ui__event_8c.html#ae6df285ba38cc8bc750993fa625b328a" title="进入 PP 页前的资源准备" alt="" coords="1185,395,1295,420"/>
<area shape="rect" href="ui__boot_8c.html#ad915e3f7b5aab86e375414a5844c500a" title="挂载文件系统以完成本地素材检测, 并将其导入至 SDRAM , 同时实现开机动画/视频效果" alt="" coords="358,433,422,459"/>
<area shape="rect" href="ui__event_8c.html#aa79ab1e226edfa66cf11eb85278bbc62" title="M0 页 跳转 M0_SHOW 页的按钮回调" alt="" coords="963,245,1107,271"/>
<area shape="rect" href="ui__event_8c.html#a4cc241fe1f2755f3c46c7dadbd3f58e2" title="M4 页 跳转 M4_SHOW 页的按钮回调" alt="" coords="963,295,1107,320"/>
<area shape="rect" href="ui__event_8c.html#a3d4333831962ec3ffc6e449faad388f7" title="主桌面 M0 页注册事件回调" alt="" coords="719,245,901,271"/>
<area shape="rect" href="setup__home__page__m0_8c.html#aa198ac34b1b6fa9f86d497cc3baf1d19" title="创建 M0 页" alt="" coords="504,245,657,271"/>
<area shape="rect" href="ui_8c.html#a42bb09ef137aaeb1733173f3a88ccc85" title="UI 初始化" alt="" coords="227,307,283,332"/>
<area shape="rect" href="main_8c.html#a8f1efe6291a27ae9b326f0c8a236c102" title="Go to User App Execute" alt="" coords="104,357,179,383"/>
<area shape="rect" href="main_8c.html#a840291bc02cba5474a4cb46a9b9566fe" title="C_Main" alt="" coords="5,357,56,383"/>
<area shape="rect" href="ui__event_8c.html#a6dbae8eeb24298bef6c9090399d4f88c" title="主桌面 M4 页注册事件回调" alt="" coords="719,295,901,320"/>
<area shape="rect" href="setup__home__page__m4_8c.html#afb77653567b2b50aef74a97266462f0c" title="创建 M4 页" alt="" coords="504,295,657,320"/>
<area shape="rect" href="ui__event_8c.html#a052ee01ff73acb520e9ea854151fbdd2" title="进入 PD 页前的资源准备" alt="" coords="1185,345,1295,371"/>
<area shape="rect" href="ui__event_8c.html#a58a9ebadd92a9ee7765fea889ed07073" title="主桌面下 Home 页四个跳转按钮的事件回调" alt="" coords="956,345,1115,371"/>
<area shape="rect" href="ui__event_8c.html#a4f51ebc6c5bd5d4bdc6e80e1d5b3f554" title="tabview 的事件回调" alt="" coords="974,395,1097,420"/>
<area shape="rect" href="ui__event_8c.html#ac0feb967035c8b6b1949cd42c92cbc69" title="主桌面 Home 页注册事件回调" alt="" coords="712,344,908,369"/>
<area shape="rect" href="setup__home__page__home_8c.html#a236ec2e4ba252c597a6c8d695eb5e825" title="创建 Home 页" alt="" coords="497,344,664,369"/>
<area shape="rect" href="ui__event_8c.html#aab07f167804a29f9a34de078552c2fee" title="主桌面注册事件回调" alt="" coords="507,393,654,419"/>
<area shape="rect" href="ui__event_8c.html#ad1d3e81dc6359afc038bd1472b162e25" title="Picture 页 GIF 操作按钮回调 &#45; 左/中/右" alt="" coords="966,80,1105,105"/>
<area shape="rect" href="ui__event_8c.html#a4e9e72dc1392fbfa791b66d58f43cad0" title="主桌面 PP 页注册事件回调" alt="" coords="721,80,899,105"/>
<area shape="rect" href="setup__home__page__pp_8c.html#a2dc049611b8a6a5e649913c9ead4dc72" title="创建 Picture 页" alt="" coords="506,93,655,119"/>
</map>
</div>

</div>
</div>
<a id="a62a6b593e3ff4f0f2c1b13773df449b0" name="a62a6b593e3ff4f0f2c1b13773df449b0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a62a6b593e3ff4f0f2c1b13773df449b0">&#9670;&#160;</a></span>remove_source_to_sdram()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint8_t remove_source_to_sdram </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="load__file_8h.html#a044f73b36811553cd877767a7df11f83">resource_t</a>&#160;</td>
          <td class="paramname"><em>type</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>source</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t(*)(void *)&#160;</td>
          <td class="paramname"><em>ram_free</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>销毁位于 SDRAM 内的资源 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">type</td><td>: 资源类型 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">source</td><td>: 对应资源结构体(用于管理加载至 SDRAM 的资源, 可自定义解析) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">ram_free</td><td>: (释放结果)&lt;*内存释放回调&gt;(分配成功的内存块首地址) </td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>返回值</dt><dd>
  <table class="retval">
    <tr><td class="paramname">0</td><td>: success </td></tr>
    <tr><td class="paramname">other</td><td>: error code </td></tr>
  </table>
  </dd>
</dl>
<dl class="section pre"><dt>前置条件</dt><dd>调用者有责任确保本函数调用时 source 对应资源结构体 是成功加载有效的. </dd></dl>
<dl class="section note"><dt>注解</dt><dd>本函数调用成功后, 对应资源结构体 source 不可用. </dd></dl>
<dl class="section user"><dt>示例:</dt><dd><div class="fragment"><div class="line"><a class="code hl_function" href="load__file_8c.html#a62a6b593e3ff4f0f2c1b13773df449b0">remove_source_to_sdram</a>(<a class="code hl_enumvalue" href="load__file_8h.html#a044f73b36811553cd877767a7df11f83a1e00c983d4be44226a3b1ba10382e3e9">IMG</a>, &amp;lv_img_dsc, <a class="code hl_function" href="mem__sdram_8c.html#a9ef7e7053d4000fe99a7eacc8d9346d7">sdram_free</a>)</div>
<div class="line"><a class="code hl_function" href="load__file_8c.html#a62a6b593e3ff4f0f2c1b13773df449b0">remove_source_to_sdram</a>(<a class="code hl_enumvalue" href="load__file_8h.html#a044f73b36811553cd877767a7df11f83a3dba92f17ebb0d7efe6056d51e9acdc7">BIN</a>, &amp;font_addr, <a class="code hl_function" href="mem__sdram_8c.html#a9ef7e7053d4000fe99a7eacc8d9346d7">sdram_free</a>)</div>
<div class="ttc" id="aload__file_8c_html_a62a6b593e3ff4f0f2c1b13773df449b0"><div class="ttname"><a href="load__file_8c.html#a62a6b593e3ff4f0f2c1b13773df449b0">remove_source_to_sdram</a></div><div class="ttdeci">uint8_t remove_source_to_sdram(resource_t type, void *source, uint8_t(*ram_free)(void *))</div><div class="ttdoc">销毁位于 SDRAM 内的资源</div><div class="ttdef"><b>Definition:</b> <a href="load__file_8c_source.html#l00332">load_file.c:332</a></div></div>
<div class="ttc" id="aload__file_8h_html_a044f73b36811553cd877767a7df11f83a3dba92f17ebb0d7efe6056d51e9acdc7"><div class="ttname"><a href="load__file_8h.html#a044f73b36811553cd877767a7df11f83a3dba92f17ebb0d7efe6056d51e9acdc7">BIN</a></div><div class="ttdeci">@ BIN</div><div class="ttdoc">其他 bin 文件(目前仅实现字库)</div><div class="ttdef"><b>Definition:</b> <a href="load__file_8h_source.html#l00051">load_file.h:51</a></div></div>
<div class="ttc" id="amem__sdram_8c_html_a9ef7e7053d4000fe99a7eacc8d9346d7"><div class="ttname"><a href="mem__sdram_8c.html#a9ef7e7053d4000fe99a7eacc8d9346d7">sdram_free</a></div><div class="ttdeci">uint8_t sdram_free(void *ptr)</div><div class="ttdoc">释放一块内存</div><div class="ttdef"><b>Definition:</b> <a href="mem__sdram_8c_source.html#l00183">mem_sdram.c:183</a></div></div>
</div><!-- fragment --> </dd></dl>

<p class="definition">在文件 <a class="el" href="load__file_8c_source.html">load_file.c</a> 第 <a class="el" href="load__file_8c_source.html#l00332">332</a> 行定义.</p>
<div class="dynheader">
这是这个函数的调用关系图:</div>
<div class="dyncontent">
<div class="center"><img src="load__file_8h_a62a6b593e3ff4f0f2c1b13773df449b0_icgraph.png" border="0" usemap="#aload__file_8h_a62a6b593e3ff4f0f2c1b13773df449b0_icgraph" alt=""/></div>
<map name="aload__file_8h_a62a6b593e3ff4f0f2c1b13773df449b0_icgraph" id="aload__file_8h_a62a6b593e3ff4f0f2c1b13773df449b0_icgraph">
<area shape="rect" title="销毁位于 SDRAM 内的资源" alt="" coords="1936,188,2107,213"/>
<area shape="rect" href="ui__event_8c.html#a5d0714ab1f8d703a7a6aa480a25ba608" title="GIF 轮播刷新任务(用于 M0 芯片素材显示)" alt="" coords="1773,237,1865,262"/>
<area shape="rect" href="ui__event_8c.html#a443210034526535b309f60ac9de63be6" title="GIF 轮播刷新任务(用于 M4 芯片素材显示)" alt="" coords="1773,188,1865,213"/>
<area shape="rect" href="ui__event_8c.html#a58f9ab749ec978cf6b8533ef55bf1045" title="产品应用演示 GIF 轮播刷新任务" alt="" coords="1580,338,1668,364"/>
<area shape="rect" href="ui__event_8c.html#a9a58add9c7451890f77c03ad8136b20d" title="中文字体 与 GIF 轮播演示 任务" alt="" coords="1775,37,1863,62"/>
<area shape="rect" href="ui__event_8c.html#a22a386f4f548c71737aba2415eba22fd" title="开始/暂停 按钮" alt="" coords="1565,37,1683,62"/>
<area shape="rect" href="ui__event_8c.html#a201743dfea0db58797dca624b7d9c5e5" title="退出 M0 / M4 SHOW 页前的清理、释放资源" alt="" coords="1749,138,1888,164"/>
<area shape="rect" href="ui__event_8c.html#a327a85392000232adf5057ea3bcd0322" title="退出 PP 页前的清理、释放资源" alt="" coords="1173,288,1282,313"/>
<area shape="rect" href="ui__event_8c.html#aad0d0389b8cba40e9e02c141ce143196" title="上一张 / 下一张 按钮" alt="" coords="1547,86,1701,112"/>
<area shape="rect" href="ui__boot_8c.html#ad915e3f7b5aab86e375414a5844c500a" title="挂载文件系统以完成本地素材检测, 并将其导入至 SDRAM , 同时实现开机动画/视频效果" alt="" coords="358,376,422,401"/>
<area shape="rect" href="ui__event_8c.html#ac098d7daab78175856fe3d9f75df0347" title="进入 M0 / M4 SHOW 页前的资源准备" alt="" coords="1350,212,1489,237"/>
<area shape="rect" href="ui__event_8c.html#aa79ab1e226edfa66cf11eb85278bbc62" title="M0 页 跳转 M0_SHOW 页的按钮回调" alt="" coords="963,237,1107,262"/>
<area shape="rect" href="ui__event_8c.html#a4cc241fe1f2755f3c46c7dadbd3f58e2" title="M4 页 跳转 M4_SHOW 页的按钮回调" alt="" coords="963,138,1107,164"/>
<area shape="rect" href="ui__event_8c.html#a3d4333831962ec3ffc6e449faad388f7" title="主桌面 M0 页注册事件回调" alt="" coords="719,237,901,262"/>
<area shape="rect" href="setup__home__page__m0_8c.html#aa198ac34b1b6fa9f86d497cc3baf1d19" title="创建 M0 页" alt="" coords="504,237,657,262"/>
<area shape="rect" href="setup__scr__home_8c.html#a9e86b57f14343f1fdf1b6450fbcdef08" title="创建主桌面" alt="" coords="331,237,449,262"/>
<area shape="rect" href="ui_8c.html#a42bb09ef137aaeb1733173f3a88ccc85" title="UI 初始化" alt="" coords="227,249,283,274"/>
<area shape="rect" href="main_8c.html#a8f1efe6291a27ae9b326f0c8a236c102" title="Go to User App Execute" alt="" coords="104,300,179,325"/>
<area shape="rect" href="main_8c.html#a840291bc02cba5474a4cb46a9b9566fe" title="C_Main" alt="" coords="5,300,56,325"/>
<area shape="rect" href="ui__event_8c.html#a6dbae8eeb24298bef6c9090399d4f88c" title="主桌面 M4 页注册事件回调" alt="" coords="719,138,901,164"/>
<area shape="rect" href="setup__home__page__m4_8c.html#afb77653567b2b50aef74a97266462f0c" title="创建 M4 页" alt="" coords="504,138,657,164"/>
<area shape="rect" href="ui__event_8c.html#a052ee01ff73acb520e9ea854151fbdd2" title="进入 PD 页前的资源准备" alt="" coords="1172,338,1283,364"/>
<area shape="rect" href="ui__event_8c.html#a58a9ebadd92a9ee7765fea889ed07073" title="主桌面下 Home 页四个跳转按钮的事件回调" alt="" coords="956,338,1115,364"/>
<area shape="rect" href="ui__event_8c.html#a4f51ebc6c5bd5d4bdc6e80e1d5b3f554" title="tabview 的事件回调" alt="" coords="974,288,1097,313"/>
<area shape="rect" href="ui__event_8c.html#ac0feb967035c8b6b1949cd42c92cbc69" title="主桌面 Home 页注册事件回调" alt="" coords="712,338,908,364"/>
<area shape="rect" href="setup__home__page__home_8c.html#a236ec2e4ba252c597a6c8d695eb5e825" title="创建 Home 页" alt="" coords="497,337,664,362"/>
<area shape="rect" href="ui__event_8c.html#aab07f167804a29f9a34de078552c2fee" title="主桌面注册事件回调" alt="" coords="507,288,654,313"/>
<area shape="rect" href="ui__event_8c.html#ad1d3e81dc6359afc038bd1472b162e25" title="Picture 页 GIF 操作按钮回调 &#45; 左/中/右" alt="" coords="1350,85,1489,110"/>
<area shape="rect" href="ui__event_8c.html#a4e9e72dc1392fbfa791b66d58f43cad0" title="主桌面 PP 页注册事件回调" alt="" coords="721,89,899,114"/>
<area shape="rect" href="setup__home__page__pp_8c.html#a2dc049611b8a6a5e649913c9ead4dc72" title="创建 Picture 页" alt="" coords="506,89,655,114"/>
<area shape="rect" href="ui__event_8c.html#a994ade1f62e3df92bae5eda56445c58e" title="M0 / M4 Show 页退出按钮回调" alt="" coords="1551,136,1697,161"/>
<area shape="rect" href="ui__event_8c.html#a905108d92ce4fd3bccf05e1aec5c24bd" title="M0 / M4 芯片具体型号介绍展示页注册事件回调" alt="" coords="1340,162,1499,188"/>
<area shape="rect" href="setup__scr__m0__m4_8c.html#a3f8c5e10b9dbf61ec407b6d84a885ab7" title="创建 M0 / M4 芯片具体型号介绍展示页" alt="" coords="1163,186,1292,212"/>
<area shape="rect" href="ui__event_8c.html#a7356df791bd9a4545b909645db43f2f1" title="主桌面下的四个页面 Home / Back 键的事件回调( H B )" alt="" coords="965,188,1105,213"/>
<area shape="rect" href="ui__event_8c.html#ae39dc4b65d8a15dbb98e2321040443a9" title="主桌面 PD 页注册事件回调" alt="" coords="721,188,899,213"/>
<area shape="rect" href="setup__home__page__pd_8c.html#ab3e09574fd12d91ac7158b266241f565" title="创建 Product 页" alt="" coords="506,188,655,213"/>
</map>
</div>

</div>
</div>
<h2 class="groupheader">变量说明</h2>
<a id="a08687ba7285d01a737a269b697bb661c" name="a08687ba7285d01a737a269b697bb661c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a08687ba7285d01a737a269b697bb661c">&#9670;&#160;</a></span>VolumeStr</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">const char* const VolumeStr[FF_VOLUMES]</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">extern</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>User defied volume ID </p>
<p >User defied volume ID </p>

<p class="definition">在文件 <a class="el" href="load__file_8c_source.html">load_file.c</a> 第 <a class="el" href="load__file_8c_source.html#l00108">108</a> 行定义.</p>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.5
</small></address>
</body>
</html>
